package com.hainiu.cat.web.codeStudy;

/**
 * create by biji.zhao on 2021/6/2
 */
public class BinaryString {

    public static void main(String[] args) {
        int number = 10;
        printInfo(number);

        // 左移一位
        number = number << 1;
        printInfo(number);

        // 右移一位
        number = number >> 1;
        printInfo(number);
    }

    private static void printInfo(int num) {
        System.out.println(Integer.toBinaryString(num));
    }
}
